package com.hui.platform.falseworkapi.service.business.user.convert;

import com.hui.platform.falseworkapi.service.business.user.dto.TbUserSaveDTO;
import com.hui.platform.falseworkapi.service.business.user.entity.TbUser;
import com.hui.platform.falseworkapi.service.business.user.bo.TbUserBO;
import com.hui.platform.falseworkapi.service.business.user.dto.TbUserDTO;

import org.mapstruct.Mapper;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 *  TbUser转换器
 *
 * @author hui
 * @since 2020-04-14
 */
@Mapper
public interface TbUserConvert {

    TbUserConvert INSTANCE=Mappers.getMapper(TbUserConvert.class);

    /**
     * DTO转DO
     * @param dto dto对象
     * @return do对象
     */
    @Mappings({})
    TbUser dto2do(TbUserDTO dto);

    @Mappings({})
    TbUser dto2do(TbUserSaveDTO dto);

    @Mappings({})
    List<TbUser> dto2do(List<TbUserDTO> dtoList);

    /**
     * DO转BO
     * @param dataObject do对象
     * @return bo对象
     */
    @Mappings({})
    TbUserBO do2bo(TbUser dataObject);

    @Mappings({})
    List<TbUserBO> do2bo(List<TbUser> doList);

}
